<template>
  <el-form-item label="字段编码" required>
    <el-input v-model="value.value" placeholder="请输入"
      v-if="(value.haspublish=='N' && value.publishtype=='add_column')||(value.haspublish==null&&value.publishtype==null)" />
    <div v-if="!(value.haspublish=='N' && value.publishtype=='add_column')&&!(value.haspublish==null&&value.publishtype==null)">{{value.value}}</div>
  </el-form-item>
</template>

<script>
  export default {
    props: {
      value: {
        type: Object,
        default: []
      },
    },
    watch: {
      // force fieldcode lower
      'value.value': {
        handler(newVal, oldVal) {
          let that = this;
          that.value.value = that.value.value.toLowerCase();
        },
      },
    },
    data() {
      return {
        sp: {},
        sr: {},
        param: {}
      }
    },
    created(options) {
      let that = this;
      that.xinit();
    },
    methods: {
      xinit() {
        let that = this;
      },
    }
  }
</script>

<style>

</style>
